package com.ruoyi.system.api.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.api.mapper.InterfaceOperationLogMapper;
import com.ruoyi.system.api.domain.InterfaceOperationLog;
import com.ruoyi.system.api.service.IInterfaceOperationLogService;
import com.ruoyi.common.core.text.Convert;

/**
 * 接口操作日志 接口操作日志Service业务层处理
 * 
 * @author shihx
 * @date 2020-02-25
 */
@Service
public class InterfaceOperationLogServiceImpl implements IInterfaceOperationLogService 
{
    @Autowired
    private InterfaceOperationLogMapper interfaceOperationLogMapper;

    /**
     * 查询接口操作日志 接口操作日志
     * 
     * @param id 接口操作日志 接口操作日志ID
     * @return 接口操作日志 接口操作日志
     */
    @Override
    public InterfaceOperationLog selectInterfaceOperationLogById(Long id)
    {
        return interfaceOperationLogMapper.selectInterfaceOperationLogById(id);
    }

    /**
     * 查询接口操作日志 接口操作日志列表
     * 
     * @param interfaceOperationLog 接口操作日志 接口操作日志
     * @return 接口操作日志 接口操作日志
     */
    @Override
    public List<InterfaceOperationLog> selectInterfaceOperationLogList(InterfaceOperationLog interfaceOperationLog)
    {
        return interfaceOperationLogMapper.selectInterfaceOperationLogList(interfaceOperationLog);
    }

    /**
     * 新增接口操作日志 接口操作日志
     * 
     * @param interfaceOperationLog 接口操作日志 接口操作日志
     * @return 结果
     */
    @Override
    public int insertInterfaceOperationLog(InterfaceOperationLog interfaceOperationLog)
    {
        interfaceOperationLog.setCreateTime(DateUtils.getNowDate());
        return interfaceOperationLogMapper.insertInterfaceOperationLog(interfaceOperationLog);
    }

    /**
     * 修改接口操作日志 接口操作日志
     * 
     * @param interfaceOperationLog 接口操作日志 接口操作日志
     * @return 结果
     */
    @Override
    public int updateInterfaceOperationLog(InterfaceOperationLog interfaceOperationLog)
    {
        interfaceOperationLog.setUpdateTime(DateUtils.getNowDate());
        return interfaceOperationLogMapper.updateInterfaceOperationLog(interfaceOperationLog);
    }

    /**
     * 删除接口操作日志 接口操作日志对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteInterfaceOperationLogByIds(String ids)
    {
        return interfaceOperationLogMapper.deleteInterfaceOperationLogByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除接口操作日志 接口操作日志信息
     * 
     * @param id 接口操作日志 接口操作日志ID
     * @return 结果
     */
    @Override
    public int deleteInterfaceOperationLogById(Long id)
    {
        return interfaceOperationLogMapper.deleteInterfaceOperationLogById(id);
    }
}
